
@include ("blog.header")
<div class="container-fluid">
  <a class="btn btn-primary" href="/blog/create">添加文章</a>
  <a class="btn btn-primary" href="/auth/logout">退出登陆</a>
  @foreach ($data as $val)
  <div class="panel panel-default">
      <div class="panel-body">
     
        <span class="btn btn-info">标题</span>
        <span>{{ $val->title }}</span>
        <span class="btn btn-info">内容</span>
        <span>{{ $val->content }}</span>
        <a href="/blog/{{ $val->id }}" class="btn btn-info">阅读</a>
        <a href="/blog/{{$val->id}}/edit" class="btn btn-info">修改</a>

        
          <form action="/blog/{{$val->id}}"  method="post" style="display: inline-block;">
          {{csrf_field()}}
          {{ method_field("DELETE")}}
                <input type="hidden" name="_method" value="DELETE">
                <button type="submit" class="btn btn-danger">删除</button>
            </form>
        </div>
    </div>
@endforeach

{!!$data->render() !!}
@include ('blog.footer')



